<template>
  <div style="background: #fff">
    <h4>品牌制造商直供</h4>
    <ul class="product_list">
      <li
        v-for="item in goodsList"
        :key="item.id"
        @click="goToDetails(item.id)"
      >
        <img :src="item.list_pic_url" alt=""  />
        <div>{{ item.name }}</div>
        <section>
          {{ item.floor_price | RMBformat }}
        </section>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "ProductList",
  props: ["goodsList"],
  methods: {
    goToDetails(value) {
      // 跳转到about
      alert("暂未处理");
    },
  },
  mounted() {
    console.log("现在需要调试的数据", this.goodsList);
  },
};
</script>

<style lang = "less" scoped>
/* .custom-image .van-empty__image {
    width: 90px;
    height: 90px;
  } */
h4 {
  text-align: center;
  height: 50px;
  line-height: 50px;
  font-size: 18px;
}
.product_list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px;
  box-sizing: border-box;
  width: 100%;
  li {
    width: 49%;
    background: #fff;
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    position: relative;
    img {
      width: 100%;
      display: block;
    }
    section {
      position: absolute;
      top: 40px;
      font-size: 13px;
      /* margin-top: 5px; */
      color: darkred;
      left: 15px;
    }
    div {
      font-size: 14px;
      font-weight: 500;
      position: absolute;
      top: 15px;
      left: 15px;
    }
  }
}
</style>